<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VueComponent</title>
    <script type="text/javascript" src="../js/vue.js"></script>

</head>
<body>
<div id="root">
<school></school>
<hello></hello>
</div>
</body>
<script type="text/javascript">
    Vue.config.productionTip=false

    const school =Vue.extend({
        name:"school",
        template:"<div><h2>学校名称{{name}}</h2><h2>学校地址{{address}}</h2></div>",
        data(){
            return{
                name:'山海经',
                address:"上海",
            }
        }
    })
    const hello=Vue.extend({
        template:"<h1>{{msg}}</h1>",
        data(){
            return {
                msg:'good'
            }
        }
    })


    console.log("@",school)
    console.log("#",hello)
    new Vue({
        el:"#root",
        components:{school,hello}
    })

</script>
</html>